;;
;; Embedded Directive in Comment
;;

%"[ \t]*"0nop%"[ \t]*"1;@%"[ \t]*"2%3
=
%0%3

;;
;; RST substitution
;;

%"[ \t]*"0call%"[ \t]*"1__RST00%2
=
%0rst%1 0x00  ; call __RST00%2

%"[ \t]*"0call%"[ \t]*"1__RST08%2
=
%0rst%1 0x08  ; call __RST08%2

%"[ \t]*"0call%"[ \t]*"1__RST10%2
=
%0rst%1 0x10  ; call __RST10%2

%"[ \t]*"0call%"[ \t]*"1__RST18%2
=
%0rst%1 0x18  ; call __RST18%2

%"[ \t]*"0call%"[ \t]*"1__RST20%2
=
%0rst%1 0x20  ; call __RST20%2

%"[ \t]*"0call%"[ \t]*"1__RST28%2
=
%0rst%1 0x28  ; call __RST28%2

%"[ \t]*"0call%"[ \t]*"1__RST30%2
=
%0rst%1 0x30  ; call __RST30%2

%"[ \t]*"0call%"[ \t]*"1__RST38%2
=
%0rst%1 0x38  ; call __RST38%2

;;
;; sdcc bugfixes
;;

%"[ \t]*"0jp%"[ \t]+"1____sdcc_cpu_pop_ei
=
	jp	____sdcc_cpu_pop_ei_jp

%"[ \t]*"0jp%"[ \tNZCMPOE]+"1,%"[ \t]*"2____sdcc_cpu_pop_ei
=
	jp%1, ____sdcc_cpu_pop_ei_jp
